﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Lincolnwood.Foundation.Scheduling" namespace="Lincolnwood.Foundation.Scheduling" default-lazy="false">
  <class name="RecurrencePattern">
    <id name="Id" access="field.camelcase-underscore">
      <generator class="guid"/>
    </id>
    <discriminator column="RecurrencePattern_Type" type="String"/>
    <property name="EndDate"/>
    <property name="Interval"/>
    <set name="PatternDeviations" access="field.camelcase-underscore" cascade="all">
      <key column="RecurrencePatternId" foreign-key="fk_PatternDeviations_RecurrencePattern"/>
      <one-to-many class="PatternDeviation"/>
    </set>
    
    <property name="CreatedOn" not-null="true"/>
    <property name="CreatedBy"/>
    <property name="ModifiedOn"/>
    <property name="ModifiedBy"/>
  </class>
  
</hibernate-mapping>